<template>
    <div>
        <input v-model="newNumber" type="number"/>
        <button @click="pushNewNumber(newNumber)">Add new number</button>
        <span>{{storeState.members}}</span>
    </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import store from '@/store'

@Component({})
export default class NumberSubmit extends Vue {
    name = "NumberSubmit";
    newNumber = 0;
    storeState = store.state;
    public pushNewNumber(newNumber:number){
        this.$store.commit("pushNewNumber",newNumber);
    }
}
</script>

<style scoped>
</style>
